#pragma once
class List {
public:
	List(int size = 100);
	~List();

	bool insert(int index, char x);
	/* inserts a new character into the list
	index: the position after which the new character is inserted (the head is at position 1)
	x: the new character that is to be inserted
	returned value: true if the insertion is successful, false otherwise */
	int deletechar(char x);
	/* deletes a character from the list
	x: the value of the character to be deleted
	returned value: the position of the character in the list, 0 if no such character is found */
	int search(char x);
	/* searches for a character in the list
	x: the value of the character to be searched for
	returned value: the position of the character in the list, 0 if no such character is found */
	void printList();
	/* prints all the characters in the list and follows is a sample output:
	A, c, S, t, d - character count: 5 */
private:
	char *values;
	/* the array used to store the characters */
	int counter;
	/* the number of characters in the array */
	int maxSize;
	/* the size of the array */
};